Integrand size = 40, antiderivative size = 136 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{8} \left (3 a^2 B+4 b^2 B+8 a b C\right ) x+\frac {\left (2 a b B+a^2 C+b^2 C\right ) \sin (c+d x)}{d}+\frac {\left (3 a^2 B+4 b^2 B+8 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 B \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a (2 b B+a C) \sin ^3(c+d x)}{3 d} \]
1/8*(3*B*a^2+4*B*b^2+8*C*a*b)*x+(2*B*a*b+C*a^2+C*b^2)*sin(d*x+c)/d+1/8*(3* B*a^2+4*B*b^2+8*C*a*b)*cos(d*x+c)*sin(d*x+c)/d+1/4*a^2*B*cos(d*x+c)^3*sin( d*x+c)/d-1/3*a*(2*B*b+C*a)*sin(d*x+c)^3/d
Time = 1.81 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.87 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {12 \left (3 a^2 B+4 b^2 B+8 a b C\right ) (c+d x)+24 \left (6 a b B+3 a^2 C+4 b^2 C\right ) \sin (c+d x)+24 \left (a^2 B+b^2 B+2 a b C\right ) \sin (2 (c+d x))+8 a (2 b B+a C) \sin (3 (c+d x))+3 a^2 B \sin (4 (c+d x))}{96 d} \]
(12*(3*a^2*B + 4*b^2*B + 8*a*b*C)*(c + d*x) + 24*(6*a*b*B + 3*a^2*C + 4*b^ 2*C)*Sin[c + d*x] + 24*(a^2*B + b^2*B + 2*a*b*C)*Sin[2*(c + d*x)] + 8*a*(2 *b*B + a*C)*Sin[3*(c + d*x)] + 3*a^2*B*Sin[4*(c + d*x)])/(96*d)
Time = 0.89 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.93, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {3042, 4560, 3042, 4512, 25, 3042, 4535, 3042, 3115, 24, 4532, 3042, 3492, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^5}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 4512 |
\(\displaystyle \frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}-\frac {1}{4} \int -\cos ^3(c+d x) \left (4 b^2 C \sec ^2(c+d x)+\left (3 B a^2+8 b C a+4 b^2 B\right ) \sec (c+d x)+4 a (2 b B+a C)\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{4} \int \cos ^3(c+d x) \left (4 b^2 C \sec ^2(c+d x)+\left (3 B a^2+8 b C a+4 b^2 B\right ) \sec (c+d x)+4 a (2 b B+a C)\right )dx+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {4 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (3 B a^2+8 b C a+4 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+4 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{4} \left (\left (3 a^2 B+8 a b C+4 b^2 B\right ) \int \cos ^2(c+d x)dx+\int \cos ^3(c+d x) \left (4 b^2 C \sec ^2(c+d x)+4 a (2 b B+a C)\right )dx\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\left (3 a^2 B+8 a b C+4 b^2 B\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\int \frac {4 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+4 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{4} \left (\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\int \frac {4 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+4 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{4} \left (\int \frac {4 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+4 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4532 |
\(\displaystyle \frac {1}{4} \left (\int \cos (c+d x) \left (4 C b^2+4 a (2 b B+a C) \cos ^2(c+d x)\right )dx+\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\int \sin \left (c+d x+\frac {\pi }{2}\right ) \left (4 C b^2+4 a (2 b B+a C) \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx+\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3492 |
\(\displaystyle \frac {1}{4} \left (\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {\int \left (4 \left (C a^2+2 b B a+b^2 C\right )-4 a (2 b B+a C) \sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} \left (\left (3 a^2 B+8 a b C+4 b^2 B\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {\frac {4}{3} a (a C+2 b B) \sin ^3(c+d x)-4 \left (a^2 C+2 a b B+b^2 C\right ) \sin (c+d x)}{d}\right )+\frac {a^2 B \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
(a^2*B*Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + ((3*a^2*B + 4*b^2*B + 8*a*b*C) *(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)) - (-4*(2*a*b*B + a^2*C + b^2*C) *Sin[c + d*x] + (4*a*(2*b*B + a*C)*Sin[c + d*x]^3)/3)/d)/4
3.8.82.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[-f^(-1) Subst[Int[(1 - x^2)^((m - 1)/2)*(A + C - C*x^2 ), x], x, Cos[e + f*x]], x] /; FreeQ[{e, f, A, C}, x] && IGtQ[(m + 1)/2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^2*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a^2*A*Cos[ e + f*x]*((d*Csc[e + f*x])^(n + 1)/(d*f*n)), x] + Simp[1/(d*n) Int[(d*Csc [e + f*x])^(n + 1)*(a*(2*A*b + a*B)*n + (2*a*b*B*n + A*(b^2*n + a^2*(n + 1) ))*Csc[e + f*x] + b^2*B*n*Csc[e + f*x]^2), x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Int[(C + A*Sin[e + f*x]^2)/Sin[e + f*x]^(m + 2), x] /; FreeQ[ {e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && ILtQ[(m + 1)/2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.56 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.87
method | result | size |
parallelrisch | \(\frac {24 \left (B \,a^{2}+B \,b^{2}+2 C a b \right ) \sin \left (2 d x +2 c \right )+8 \left (2 B a b +C \,a^{2}\right ) \sin \left (3 d x +3 c \right )+3 B \,a^{2} \sin \left (4 d x +4 c \right )+24 \left (6 B a b +3 C \,a^{2}+4 C \,b^{2}\right ) \sin \left (d x +c \right )+36 x d \left (B \,a^{2}+\frac {4}{3} B \,b^{2}+\frac {8}{3} C a b \right )}{96 d}\) | \(118\) |
derivativedivides | \(\frac {B \,a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 B a b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+\frac {C \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 C a b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right ) b^{2}}{d}\) | \(152\) |
default | \(\frac {B \,a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 B a b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+\frac {C \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 C a b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right ) b^{2}}{d}\) | \(152\) |
risch | \(\frac {3 a^{2} B x}{8}+\frac {x B \,b^{2}}{2}+x C a b +\frac {3 \sin \left (d x +c \right ) B a b}{2 d}+\frac {3 \sin \left (d x +c \right ) C \,a^{2}}{4 d}+\frac {\sin \left (d x +c \right ) C \,b^{2}}{d}+\frac {B \,a^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) B a b}{6 d}+\frac {\sin \left (3 d x +3 c \right ) C \,a^{2}}{12 d}+\frac {B \,a^{2} \sin \left (2 d x +2 c \right )}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B \,b^{2}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) C a b}{2 d}\) | \(170\) |
norman | \(\frac {\left (-\frac {3}{8} B \,a^{2}-\frac {1}{2} B \,b^{2}-C a b \right ) x +\left (-\frac {9}{4} B \,a^{2}-3 B \,b^{2}-6 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-\frac {3}{4} B \,a^{2}-B \,b^{2}-2 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {3}{4} B \,a^{2}-B \,b^{2}-2 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {3}{4} B \,a^{2}+B \,b^{2}+2 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {3}{4} B \,a^{2}+B \,b^{2}+2 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (\frac {3}{8} B \,a^{2}+\frac {1}{2} B \,b^{2}+C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{16}+\left (\frac {9}{4} B \,a^{2}+3 B \,b^{2}+6 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (3 B \,a^{2}-16 B a b -36 B \,b^{2}-8 C \,a^{2}-72 C a b -72 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {\left (3 B \,a^{2}+16 B a b -36 B \,b^{2}+8 C \,a^{2}-72 C a b +72 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{12 d}-\frac {\left (5 B \,a^{2}-16 B a b +4 B \,b^{2}-8 C \,a^{2}+8 C a b -8 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{15}}{4 d}-\frac {\left (5 B \,a^{2}+16 B a b +4 B \,b^{2}+8 C \,a^{2}+8 C a b +8 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (27 B \,a^{2}-80 B a b -36 B \,b^{2}-40 C \,a^{2}-72 C a b -72 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {\left (27 B \,a^{2}+80 B a b -36 B \,b^{2}+40 C \,a^{2}-72 C a b +72 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{12 d}+\frac {\left (39 B \,a^{2}-16 B a b +12 B \,b^{2}-8 C \,a^{2}+24 C a b +24 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{12 d}+\frac {\left (39 B \,a^{2}+16 B a b +12 B \,b^{2}+8 C \,a^{2}+24 C a b -24 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}\) | \(673\) |
1/96*(24*(B*a^2+B*b^2+2*C*a*b)*sin(2*d*x+2*c)+8*(2*B*a*b+C*a^2)*sin(3*d*x+ 3*c)+3*B*a^2*sin(4*d*x+4*c)+24*(6*B*a*b+3*C*a^2+4*C*b^2)*sin(d*x+c)+36*x*d *(B*a^2+4/3*B*b^2+8/3*C*a*b))/d
Time = 0.25 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.84 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (3 \, B a^{2} + 8 \, C a b + 4 \, B b^{2}\right )} d x + {\left (6 \, B a^{2} \cos \left (d x + c\right )^{3} + 16 \, C a^{2} + 32 \, B a b + 24 \, C b^{2} + 8 \, {\left (C a^{2} + 2 \, B a b\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, B a^{2} + 8 \, C a b + 4 \, B b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
integrate(cos(d*x+c)^5*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
1/24*(3*(3*B*a^2 + 8*C*a*b + 4*B*b^2)*d*x + (6*B*a^2*cos(d*x + c)^3 + 16*C *a^2 + 32*B*a*b + 24*C*b^2 + 8*(C*a^2 + 2*B*a*b)*cos(d*x + c)^2 + 3*(3*B*a ^2 + 8*C*a*b + 4*B*b^2)*cos(d*x + c))*sin(d*x + c))/d
Timed out. \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
Time = 0.26 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.04 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} - 64 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a b + 48 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a b + 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{2} + 96 \, C b^{2} \sin \left (d x + c\right )}{96 \, d} \]
integrate(cos(d*x+c)^5*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
1/96*(3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B*a^2 - 32 *(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a^2 - 64*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a*b + 48*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a*b + 24*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*b^2 + 96*C*b^2*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 437 vs. \(2 (128) = 256\).
Time = 0.32 (sec) , antiderivative size = 437, normalized size of antiderivative = 3.21 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (3 \, B a^{2} + 8 \, C a b + 4 \, B b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (15 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 48 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 80 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 24 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 72 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 12 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
1/24*(3*(3*B*a^2 + 8*C*a*b + 4*B*b^2)*(d*x + c) - 2*(15*B*a^2*tan(1/2*d*x + 1/2*c)^7 - 24*C*a^2*tan(1/2*d*x + 1/2*c)^7 - 48*B*a*b*tan(1/2*d*x + 1/2* c)^7 + 24*C*a*b*tan(1/2*d*x + 1/2*c)^7 + 12*B*b^2*tan(1/2*d*x + 1/2*c)^7 - 24*C*b^2*tan(1/2*d*x + 1/2*c)^7 - 9*B*a^2*tan(1/2*d*x + 1/2*c)^5 - 40*C*a ^2*tan(1/2*d*x + 1/2*c)^5 - 80*B*a*b*tan(1/2*d*x + 1/2*c)^5 + 24*C*a*b*tan (1/2*d*x + 1/2*c)^5 + 12*B*b^2*tan(1/2*d*x + 1/2*c)^5 - 72*C*b^2*tan(1/2*d *x + 1/2*c)^5 + 9*B*a^2*tan(1/2*d*x + 1/2*c)^3 - 40*C*a^2*tan(1/2*d*x + 1/ 2*c)^3 - 80*B*a*b*tan(1/2*d*x + 1/2*c)^3 - 24*C*a*b*tan(1/2*d*x + 1/2*c)^3 - 12*B*b^2*tan(1/2*d*x + 1/2*c)^3 - 72*C*b^2*tan(1/2*d*x + 1/2*c)^3 - 15* B*a^2*tan(1/2*d*x + 1/2*c) - 24*C*a^2*tan(1/2*d*x + 1/2*c) - 48*B*a*b*tan( 1/2*d*x + 1/2*c) - 24*C*a*b*tan(1/2*d*x + 1/2*c) - 12*B*b^2*tan(1/2*d*x + 1/2*c) - 24*C*b^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 16.91 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.24 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3\,B\,a^2\,x}{8}+\frac {B\,b^2\,x}{2}+\frac {3\,C\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,b^2\,\sin \left (c+d\,x\right )}{d}+C\,a\,b\,x+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a^2\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {B\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {3\,B\,a\,b\,\sin \left (c+d\,x\right )}{2\,d}+\frac {B\,a\,b\,\sin \left (3\,c+3\,d\,x\right )}{6\,d}+\frac {C\,a\,b\,\sin \left (2\,c+2\,d\,x\right )}{2\,d} \]
(3*B*a^2*x)/8 + (B*b^2*x)/2 + (3*C*a^2*sin(c + d*x))/(4*d) + (C*b^2*sin(c + d*x))/d + C*a*b*x + (B*a^2*sin(2*c + 2*d*x))/(4*d) + (B*a^2*sin(4*c + 4* d*x))/(32*d) + (B*b^2*sin(2*c + 2*d*x))/(4*d) + (C*a^2*sin(3*c + 3*d*x))/( 12*d) + (3*B*a*b*sin(c + d*x))/(2*d) + (B*a*b*sin(3*c + 3*d*x))/(6*d) + (C *a*b*sin(2*c + 2*d*x))/(2*d)